﻿import QtQuick 2.0
import "../components"
Item {

    property string name: "DEFAULT_NAME"
    property string program: "DEFAULT_PROGRAM"
    property string code: "DEFAULT_CODE"
    property string kit: "DEFAULT_KIT"
    property string system: "DEFAULT_SYSTEM"
    property string consume: "DEFAULT_CONSUME"

    property bool isEditable: false

    onNameChanged: {
        edit_name.setText(name)
    }onProgramChanged: {
        edit_program.setText(program)
    }onCodeChanged: {
        edit_code.setText(code)
    }onKitChanged: {
        edit_kit.setText(kit)
    }onSystemChanged: {
        edit_system.setText(system)
    }onConsumeChanged: {
        edit_consume.setText(consume)
    }
    // 这是一个假的lineedit
    // 怎么让lineedit实现双向数据绑定呀

    Item{           // 居中显示
        anchors.centerIn: parent
        height: 360*dp
        width: 380*dp
        Column{
            spacing: 15*dp
            LineEditor{
                id: edit_name
                title: "实验名称"
                required: true
                editWidth: 300*dp
                editable: isEditable
            }
            LineEditor{
                id: edit_program
                title: "扩增程序"
                editWidth: 300*dp
                editable: isEditable
            }
            LineEditor{
                id: edit_code
                title: "编码"
                editWidth: 300*dp
                editable: isEditable
            }
            LineEditor{
                id: edit_kit
                title: "试剂盒"
                editWidth: 300*dp
                editable: isEditable
            }
            LineEditor{
                id: edit_system
                title: "体系(μl)"
                editWidth: 300*dp
                editable: isEditable
            }
            LineEditor{
                id: edit_consume
                title: "耗材"
                editWidth: 300*dp
                editable: isEditable
            }
        }


    }
}
